var JPush=require('../../node_modules/jpush-sdk/lib/JPush/JPush.js')
var client=JPush.buildClient('3b0b03e779f917a6acb4c6d7','bd7d9cfe376dea79ba78cf29')

var getPushService=function(){
	return {
		pushNotification:function(message,call_back){
			client.push()
			.setPlatform(JPush.ALL)
			.setAudience(JPush.ALL)
			.setNotification('Hello world',JPush.ios('ios alert','happy',5))
			.send(call_back)
		},

		pushMessage:function(message,call_back){
			client.push()
			.setPlatform(JPush.ALL)
			.setAudience(JPush.ALL)
			.setMessage('hello world')
			.setOptions(null,60)
			.send(call_back)
		}
	}
}

exports.getPushService=getPushService
